Skip to content

Simplify tokens#124

Merged
RogerPodacter merged 1 commit into
evm-backend-demofrom
simplify
Oct 17, 2025
Merged

Simplify tokens#124
RogerPodacter merged 1 commit into
evm-backend-demofrom
simplify

Conversation

@RogerPodacter

@RogerPodacter RogerPodacter commented Oct 17, 2025

Copy link
Copy Markdown
Member

Note

Removes protocol from TokenInfo, inlines deploy logic in op_deploy, and updates Ruby reader and tests to the new ABI/layout.

  • Contracts (contracts/src/TokenManager.sol):
    • Remove protocol from TokenInfo and related storage/writes.
    • Inline deploy validation and clone initialization directly in op_deploy; remove _deployToken.
    • Store token info without protocol; map deployToTick and emit TokenDeployed as before.
    • Note: ABI of getTokenInfo* tuple changed (protocol string removed; field order shifted).
  • Tests (contracts/test/EthscriptionsToken.t.sol):
    • Drop assertion on tokenInfo.protocol to match new struct.
  • Backend (lib/token_reader.rb):
    • Update ABI decoding for TokenInfo (remove protocol field, adjust indices).
    • Set protocol: 'erc-20' client-side; keep mintLimit mapped from mintAmount.

Written by Cursor Bugbot for commit 887867f. This will update automatically on new commits. Configure here.

@RogerPodacter RogerPodacter requested a review from Copilot October 17, 2025 19:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the token system by removing the protocol field from the TokenInfo struct since it always stores "erc-20" for TokenManager. The protocol value is now hardcoded where needed instead of being stored.

Key Changes:

  • Removed protocol field from TokenInfo struct in TokenManager contract
  • Inlined the _deployToken helper function into handleDeploy since protocol is now constant
  • Updated Ruby token reader to hardcode protocol as "erc-20" instead of decoding it

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
contracts/src/TokenManager.sol Removed protocol field from TokenInfo struct and inlined _deployToken function
contracts/test/EthscriptionsToken.t.sol Removed assertion for protocol field since it's no longer stored
lib/token_reader.rb Updated ABI decoder to remove protocol field and hardcode it to "erc-20"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@RogerPodacter RogerPodacter merged commit 9d57d6e into evm-backend-demo Oct 17, 2025
1 of 2 checks passed
@RogerPodacter RogerPodacter deleted the simplify branch October 17, 2025 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants